package demo004;
/**
 * 学习泛型
 * @author zanglaowei
 *
 */
public class demo004 {
	public static void main(String args[]){
		/**
		 * 类中使用泛型
		 */
		Generic<Integer,String> genericInteger = new Generic<Integer,String>(123456);
		genericInteger.setE("testName");
		
		Generic<String,Integer> genericString = new Generic<String,Integer>("key_vlaue");
		System.out.println("泛型测试Integer,key is " + genericInteger.getKey());
		System.out.println("泛型测试String,key is " + genericString.getKey());
		
		/**
		 * 通过TestA和TestB 
		 */
		TestA testA=new TestA();
		testA.Test();
		
		TestB<String> testB=new TestB<String>();
		testB.TestOne("123");
		testB.Test();
	}
	
	
}
